package com.bjbn.dto;

import lombok.Data;

import javax.xml.bind.annotation.*;
import java.util.List;

/**
 * 航班消息DTO类
 * 
 * @author bjbn
 */
@Data
@XmlRootElement(name = "MSG")
@XmlAccessorType(XmlAccessType.FIELD)
public class FlightMessage {

    @XmlElement(name = "META")
    private Meta meta;

    @XmlElement(name = "DFLT")
    private FlightData flightData;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Meta {
        @XmlElement(name = "SNDR")
        private String sndr;

        @XmlElement(name = "RCVR")
        private String rcvr;

        @XmlElement(name = "SEQN")
        private String seqn;

        @XmlElement(name = "DDTM")
        private String ddtm;

        @XmlElement(name = "TYPE")
        private String type;

        @XmlElement(name = "STYP")
        private String styp;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class FlightData {
        @XmlElement(name = "FLID")
        private String flid;

        @XmlElement(name = "AFID")
        private String afid;

        @XmlElement(name = "FFID")
        private String ffid;

        @XmlElement(name = "AWCD")
        private String awcd;

        @XmlElement(name = "FLNO")
        private String flno;

        @XmlElement(name = "FEXD")
        private String fexd;

        @XmlElement(name = "FIMD")
        private String fimd;

        @XmlElement(name = "FLIO")
        private String flio;

        @XmlElement(name = "FLTK")
        private String fltk;

        @XmlElement(name = "FATT")
        private String fatt;

        @XmlElement(name = "PATT")
        private String patt;

        @XmlElement(name = "MFID")
        private String mfid;

        @XmlElement(name = "MFFI")
        private String mffi;

        @XmlElement(name = "CONT")
        private String cont;

        @XmlElement(name = "PROX")
        private String prox;

        @XmlElement(name = "CFTP")
        private String cftp;

        @XmlElement(name = "CFNO")
        private String cfno;

        @XmlElement(name = "STAT")
        private String stat;

        @XmlElement(name = "ABST")
        private String abst;

        @XmlElement(name = "ABRS")
        private String abrs;

        @XmlElement(name = "ISTA")
        private String ista;

        @XmlElement(name = "IAST")
        private String iast;

        @XmlElement(name = "IARS")
        private String iars;

        @XmlElement(name = "MSTA")
        private String msta;

        @XmlElement(name = "MABS")
        private String mabs;

        @XmlElement(name = "MABR")
        private String mabr;

        @XmlElement(name = "MIST")
        private String mist;

        @XmlElement(name = "MIAS")
        private String mias;

        @XmlElement(name = "MIAR")
        private String miar;

        @XmlElement(name = "BORT")
        private String bort;

        @XmlElement(name = "MBOR")
        private String mbor;

        @XmlElement(name = "TBRT")
        private String tbrt;

        @XmlElement(name = "MTBR")
        private String mtbr;

        @XmlElement(name = "LBDT")
        private String lbdt;

        @XmlElement(name = "MLBD")
        private String mlbd;

        @XmlElement(name = "POKT")
        private String pokt;

        @XmlElement(name = "MPOK")
        private String mpok;

        @XmlElement(name = "APOT")
        private String apot;

        @XmlElement(name = "DETT")
        private String dett;

        @XmlElement(name = "DRTT")
        private String drtt;

        @XmlElement(name = "DELT")
        private String delt;

        @XmlElement(name = "DRLT")
        private String drlt;

        @XmlElement(name = "VIP")
        private String vip;

        @XmlElement(name = "SFLG")
        private Sflg sflg;

        @XmlElement(name = "PAST")
        private String past;

        @XmlElement(name = "AIRL")
        private Airl airl;

        @XmlElement(name = "GTLS")
        private Gtls gtls;

        @XmlElement(name = "BLLS")
        private Blls blls;

        @XmlElement(name = "CHLS")
        private Chls chls;

        @XmlElement(name = "CKLS")
        private Ckls ckls;

        @XmlElement(name = "STLS")
        private Stls stls;

        @XmlElement(name = "TMCD")
        private Tmcd tmcd;

        @XmlElement(name = "RWAY")
        private String rway;

        @XmlElement(name = "FLDT")
        private String fldt;

        @XmlElement(name = "MFLT")
        private String mflt;

        @XmlElement(name = "LLDT")
        private String lldt;

        @XmlElement(name = "MLLT")
        private String mllt;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Sflg {
        @XmlElement(name = "SFLT")
        private List<Sflt> sfltList;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Sflt {
        @XmlElement(name = "SFAW")
        private String sfaw;

        @XmlElement(name = "SFNO")
        private String sfno;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Airl {
        @XmlElement(name = "ARPT")
        private List<Arpt> arptList;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Arpt {
        @XmlElement(name = "APNO")
        private String apno;

        @XmlElement(name = "APCD")
        private String apcd;

        @XmlElement(name = "FPTT")
        private String fptt;

        @XmlElement(name = "FETT")
        private String fett;

        @XmlElement(name = "FRTT")
        private String frtt;

        @XmlElement(name = "FPLT")
        private String fplt;

        @XmlElement(name = "FELT")
        private String felt;

        @XmlElement(name = "FRLT")
        private String frlt;

        @XmlElement(name = "APAT")
        private String apat;

        @XmlElement(name = "FLAG")
        private String flag;

        @XmlElement(name = "APRS")
        private String aprs;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Gtls {
        @XmlElement(name = "GATE")
        private List<Gate> gateList;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Gate {
        @XmlElement(name = "GTNO")
        private String gtno;

        @XmlElement(name = "ID")
        private String id;

        @XmlElement(name = "CODE")
        private String code;

        @XmlElement(name = "GTAT")
        private String gtat;

        @XmlElement(name = "ESTR")
        private String estr;

        @XmlElement(name = "EEND")
        private String eend;

        @XmlElement(name = "RSTR")
        private String rstr;

        @XmlElement(name = "REND")
        private String rend;

        @XmlElement(name = "BTSC")
        private String btsc;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Blls {
        @XmlElement(name = "BELT")
        private List<Belt> beltList;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Belt {
        @XmlElement(name = "BTNO")
        private String btno;

        @XmlElement(name = "ID")
        private String id;

        @XmlElement(name = "CODE")
        private String code;

        @XmlElement(name = "BTAT")
        private String btat;

        @XmlElement(name = "ESTR")
        private String estr;

        @XmlElement(name = "EEND")
        private String eend;

        @XmlElement(name = "RSTR")
        private String rstr;

        @XmlElement(name = "REND")
        private String rend;

        @XmlElement(name = "EXNO")
        private String exno;

        @XmlElement(name = "BTSC")
        private String btsc;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Chls {
        @XmlElement(name = "CHUT")
        private List<Chut> chutList;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Chut {
        @XmlElement(name = "CHNO")
        private String chno;

        @XmlElement(name = "ID")
        private String id;

        @XmlElement(name = "CODE")
        private String code;

        @XmlElement(name = "CHAT")
        private String chat;

        @XmlElement(name = "ESTR")
        private String estr;

        @XmlElement(name = "EEND")
        private String eend;

        @XmlElement(name = "RSTR")
        private String rstr;

        @XmlElement(name = "REND")
        private String rend;

        @XmlElement(name = "BTSC")
        private String btsc;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Ckls {
        @XmlElement(name = "FCES")
        private String fces;

        @XmlElement(name = "FCEE")
        private String fcee;

        @XmlElement(name = "FCRS")
        private String fcrs;

        @XmlElement(name = "FCRE")
        private String fcre;

        @XmlElement(name = "MCES")
        private String mces;

        @XmlElement(name = "MCEE")
        private String mcee;

        @XmlElement(name = "MCRS")
        private String mcrs;

        @XmlElement(name = "MCRE")
        private String mcre;

        @XmlElement(name = "FCDP")
        private String fcdp;

        @XmlElement(name = "MCDP")
        private String mcdp;

        @XmlElement(name = "CNTR")
        private List<Cntr> cntrList;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Cntr {
        @XmlElement(name = "CKNO")
        private String ckno;

        @XmlElement(name = "ID")
        private String id;

        @XmlElement(name = "CODE")
        private String code;

        @XmlElement(name = "CKAT")
        private String ckat;

        @XmlElement(name = "TYPE")
        private String type;

        @XmlElement(name = "CCAR")
        private String ccar;

        @XmlElement(name = "ESTR")
        private String estr;

        @XmlElement(name = "EEND")
        private String eend;

        @XmlElement(name = "RSTR")
        private String rstr;

        @XmlElement(name = "REND")
        private String rend;

        @XmlElement(name = "BTSC")
        private String btsc;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Stls {
        @XmlElement(name = "STND")
        private List<Stnd> stndList;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Stnd {
        @XmlElement(name = "STNO")
        private String stno;

        @XmlElement(name = "CODE")
        private String code;

        @XmlElement(name = "ESTR")
        private String estr;

        @XmlElement(name = "EEND")
        private String eend;

        @XmlElement(name = "RSTR")
        private String rstr;

        @XmlElement(name = "REND")
        private String rend;

        @XmlElement(name = "BTSC")
        private String btsc;

        @XmlElement(name = "CSSI")
        private String cssi;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Tmcd {
        @XmlElement(name = "NMCD")
        private String nmcd;

        @XmlElement(name = "JMCD")
        private String jmcd;
    }
} 